﻿@model IEnumerable<IkoulaACDF.Models.AcdfCategory>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<div class="btn-group">
    <span class="btn btn-default navbar-btn">@Html.ActionLink("Create New Category", "Create")</span>
</div>

<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.CategoryName)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.ActionLink("Add new photo in " + Html.DisplayFor(modelItem => item.CategoryName), "CreateNew", "Photo", new { catId = Html.DisplayFor(modelItem => item.CategoryId) }, null)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.CategoryId }) |
            @Html.ActionLink("Details", "Details", new { id=item.CategoryId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.CategoryId })
        </td>
    </tr>
}

</table>
